package com.kongjs.common.mybatis.user;

public class UserContextHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();

    public static void setUserId(String userId) {
        contextHolder.set(userId);
    }

    public static String getUserId() {
        return contextHolder.get();
    }

    public static void clearUserId() {
        contextHolder.remove();
    }
}
